/**
 * 
 */
package com.sci.web.action.datareportseason;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.bean.Enterprise_Authentication;
import com.sci.web.dao.DataReportMEnterpriseEuthenticationDao;

/**
 * @author  BaiFuyou
 * @date: Nov 5, 2011 6:36:38 PM
 * 
 * 更新一条数据
 */
public class UpdateEnterpriseAuthenticationAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2042988229781260069L;
	@Resource
	private DataReportMEnterpriseEuthenticationDao dataReportMEnterpriseEuthenticationDao;
	private int eaid ;
	private int eid ;
	private int authentication_type ;
	private String authentication_name ;
	private String authentication_department ;
	private String authentication_time ;
	/**
	 * @return the eaid
	 */
	public int getEaid() {
		return eaid;
	}
	/**
	 * @param eaid the eaid to set
	 */
	public void setEaid(int eaid) {
		this.eaid = eaid;
	}
	/**
	 * @return the eid
	 */
	public int getEid() {
		return eid;
	}
	/**
	 * @param eid the eid to set
	 */
	public void setEid(int eid) {
		this.eid = eid;
	}
	/**
	 * @return the authentication_type
	 */
	public int getAuthentication_type() {
		return authentication_type;
	}
	/**
	 * @param authentication_type the authentication_type to set
	 */
	public void setAuthentication_type(int authentication_type) {
		this.authentication_type = authentication_type;
	}
	/**
	 * @return the authentication_name
	 */
	public String getAuthentication_name() {
		return authentication_name;
	}
	/**
	 * @param authentication_name the authentication_name to set
	 */
	public void setAuthentication_name(String authentication_name) {
		this.authentication_name = authentication_name;
	}
	/**
	 * @return the authentication_time
	 */
	public String getAuthentication_time() {
		return authentication_time;
	}
	/**
	 * @param authentication_time the authentication_time to set
	 */
	public void setAuthentication_time(String authentication_time) {
		this.authentication_time = authentication_time;
	}
	/**
	 * @return the authentication_department
	 */
	public String getAuthentication_department() {
		return authentication_department;
	}
	/**
	 * @param authentication_department the authentication_department to set
	 */
	public void setAuthentication_department(String authentication_department) {
		this.authentication_department = authentication_department;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		Enterprise_Authentication ea = new Enterprise_Authentication();
		ea.setAuthentication_department(authentication_department);
		ea.setAuthentication_id(eaid);
		ea.setAuthentication_name(authentication_name);
		ea.setAuthentication_time(authentication_time);
		ea.setAuthentication_type(authentication_type);
		ea.setEnterprise_id(eid);
		if(dataReportMEnterpriseEuthenticationDao.updateEnterprise_AuthenticationData(ea)){
			super.outPrint("json");
		}else{
			super.outPrint("fail");
		}
		return "json";
	}
}
